//
//  GYUserCell.m
//  research
//
//  Created by 章鱼 on 17/3/28.
//  Copyright © 2017年 simon. All rights reserved.
//

#import "GYUserCell.h"

@implementation GYUserCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self initUserCellView];
        [self setBackgroundColor:[UIColor whiteColor]];
        
    }
    return self;
}

- (void)initUserCellView {
    _titleImage = [[UIImageView alloc] init];
    [self.contentView addSubview:_titleImage];
    _titleImage.contentMode = UIViewContentModeScaleAspectFit;
    
    _infoLable = [[UILabel alloc] init];
    [self.contentView addSubview:_infoLable];
    _infoLable.font = [UIFont systemFontOfSize:15];
    _infoLable.textColor = [UIColor orz_textTitle];
    
    _nextView = [[UIImageView alloc] init];
    [self.contentView addSubview:_nextView];
    _nextView.image = [UIImage imageNamed:@"personal center_icon_forward"];
    
    self.lineView=[[UIView alloc] init];
    [self.contentView addSubview:self.lineView];
    self.lineView.backgroundColor=[UIColor colorWithHex:@"e1e1e1" alpha:1];
    
    [self initUserCellUI];
}

- (void)initUserCellUI {
    [_titleImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.contentView.mas_left).offset(23.f);
        make.top.mas_equalTo(self.contentView).offset(13.f);
        make.centerY.mas_equalTo(self.contentView);
        
    }];
    
    [_infoLable mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(_titleImage);
        make.left.mas_equalTo(_titleImage.mas_right).offset(10.f);
        
    }];
    
    [_nextView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(self.contentView);
        make.right.mas_equalTo(self.contentView.mas_right).offset(-12.f);
    }];
    
    [_lineView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.contentView).offset(54.f);
        make.bottom.mas_equalTo(self.contentView);
        make.right.mas_equalTo(self.contentView);
        make.height.mas_equalTo(1);
    }];
    
}


@end
